<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>高压氧舱消毒记录表单-form</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        .form-container {
            width: 100%;
            padding-top: 20px;
        }

        .form-container>h2 {
            margin: 0 auto;
            width: 500px;
            text-align: center;
        }

        .form-container>.form-wrapper {
            display: -webkit-flex;
            display: flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            padding-top: 20px;
        }

        .form-container>.form-wrapper>div {
            width: 50%;
            margin-top: 10px;
        }

        .form-container>.form-wrapper>div>span {
            vertical-align: middle;
        }

        .form-container>.form-wrapper>div>span:nth-child(1) {
            display: inline-block;
            width: 30%;
            height: 30px;
            font-size: 14px;
            text-align: center;
        }

        .form-container>.form-wrapper>div>input {
            display: inline-block;
            width: 70%;
            height: 25px !important;
            font-size: 14px;
            text-align: center;
            vertical-align: middle;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.3);
        }

        .aui-form-list-wrapper,
        .aui-form-list-info-wrapper {
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .aui-form-list-wrapper>li {
            width: 33%;
        }

        .aui-form-list-wrapper-content {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .header {
            text-align: center;
        }

        .aui-form-list-wrapper-content>li {
            width: 50%;
        }

        .aui-list-item-label {
            width: 60% !important;
        }

        .form-submit {
            width: 100%;
            text-align: center;
            margin-top: 50px;
        }

        .form-submit>button {
            width: 170px;
            height: 50px;
            text-align: center;
            background-color: #0064B0;
            color: #fff;
            padding-bottom: 10px;
            font-size: 20px;
        }
    </style>
</head>

<body>
    <main id="app">
        <div class="form-container">
            <h2>高压氧舱消毒记录</h2>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                日期：
                            </div>
                            <div class="aui-list-item-input" id="F_YcdrTime" onclick="getDateTime()">
                                {{getDateTime}}
                            </div>
                            <!-- <div class="aui-list-item-input">
                                <input type="text" placeholder="日期" value="2017-05-16" id="F_YcdrTime">
                            </div> -->
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                时间：
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" placeholder="时间" value="" id="F_YcdrDate">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                签名：
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_YcSign">
                                    <option  v-for="(User, index) in Query_UserList" v-if="User.Permissions_Name == '技师'" :value="User.User_Id">{{User.User_Name}}</option>
                              </select>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                担架舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                通风：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_JustCaAeration" value="1" checked id="F_JustCaAeration">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                地面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_JustCaGround" value="1" checked id="F_JustCaGround">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱壁：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="舱壁"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_JustCaBulkhead" value="1" checked id="F_JustCaBulkhead">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                台面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="台面"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_JustCaMesa" value="1" checked id="F_JustCaMesa">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                座位舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                通风：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ViceCaAeration" value="1" checked id="F_ViceCaAeration">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                地面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ViceCaGround" value="1" checked id="F_ViceCaGround">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱壁：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="舱壁"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ViceCaBulkhead" value="1" checked id="F_ViceCaBulkhead">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                台面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="台面"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ViceCaMesa" value="1" checked id="F_ViceCaMesa">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                过渡舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                通风：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ExceCaAeration" value="1" checked id="F_ExceCaAeration">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                地面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ExceCaGround" value="1" checked id="F_ExceCaGround">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱壁：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="舱壁"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ExceCaBulkhead" value="1" checked id="F_ExceCaBulkhead">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                台面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="台面"> -->
                                <input class="aui-checkbox" type="checkbox" name="F_ExceCaMesa" value="1" checked id="F_ExceCaMesa">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="form-submit">
            <button onclick="Insert_HO_YcDisinfectionRecord()">提交</button>
        </div>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8"></script>
<script src="../script/vue.js" charset="utf-8"></script>
<script src="../js/ToConfigure.js" charset="utf-8"></script>
<script src="../script/aui-toast.js" charset="utf-8"></script>
<script src="../script/aui-dialog.js" charset="utf-8"></script>
<script type="text/javascript">
    var vm;
    apiready = function() {
        vm = new Vue({
            el: '#app',
            data: {
                Query_UserList: [], //舱室操舱人员信息
                getDateTime: '选择日期'
            },
            created() {
                //获取所属医院IP地址
                this.Url_IP = ToConfigure_IP("Gorgeous");

                //获取操作人员信息
                api.ajax({
                    url: this.Url_IP + 'HyperbaricOxygen/CabinTreatment/Query_UserList',
                    method: 'get',
                    data: {
                        values: {}
                    }
                }, function(ret, err) {
                    if (ret) {
                        //舱室操舱人员信息
                        vm.Query_UserList = ret;
                    } else {
                        var toast = new auiToast();
                        toast.fail({
                            title: "暂无技师信息",
                            duration: 2000
                        });
                    }
                });
            },
            watch: {
                searchInfo: function() {}
            },
            methods: {

            },
        })
    }

    function getDateTime() {
        api.openPicker({
            type: 'date',
            date: getTime,
            title: '选择开始日期'
        }, function (ret, err) {
            if (ret) {
                vm.getDateTime = '' + ret.year +
                    '-' + ret.month +
                    '-' + ret.day
            }
        });
    }
     //获取年月日
     function getTime() {
        const now = new Date();
        const formattedDate = now.toLocaleDateString('zh-CN', {
            year: 'numeric',
            month: '2-digit',
            day: '2-digit'
        }).replace(/\//g, '-');

        return formattedDate;

    }
    function closewin() {
        api.closeWin({
            name: 'disinfection-record-form'
        });
    }




    //添加高压氧消毒记录
    function Insert_HO_YcDisinfectionRecord() {


        var JsonStr = GetParameters();
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");
        if (JsonStr !== "") {
            api.ajax({
                url: Url_IP + 'EquipmentInspect/HO_YcDisinfectionRecord/Insert_HO_YcDisinfectionRecord',
                method: 'post',
                dataType: 'String',
                data: {
                    values: {
                        parms: JsonStr
                    }
                }
            }, function(ret, err) {
                if (ret == 'True') {
                    JumpPage();
                } else {
                    var toast = new auiToast();
                    toast.fail({
                        title: "提交失败",
                        duration: 2000
                    });
                }
            });
        }
    }

    //跳转页面
    function JumpPage() {
        var dialog = new auiDialog();
        dialog.alert({
            title: "提示",
            msg: '操作成功，是否跳转消毒记录记录单',
            buttons: ['取消', '确定']
        }, function(ret) {
            if (ret.buttonIndex === 1) {

            } else if (ret.buttonIndex === 2) {
                api.openWin({
                    name: 'treatment-cabin-header',
                    url: './treatment-cabin-header.html',
                    pageParam: {}
                });
            }
        })
    }





    //获取参数添氧舱消毒记录
    function GetParameters() {
        var JsParms = new Object();
        //获取日期
        JsParms.F_YcdrTime = document.getElementById("F_YcdrTime").innerText;
        //获取时间
        JsParms.F_YcdrDate = document.getElementById("F_YcdrDate").value;
        //操作人   签名
        JsParms.F_YcSign = document.getElementById("F_YcSign").value;
        //正舱通风
        JsParms.F_JustCaAeration = $api.val($api.dom("input[name='F_JustCaAeration']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_JustCaAeration === '') {
            JsParms.F_JustCaAeration = 0;
        }
        //正舱地面
        JsParms.F_JustCaGround = $api.val($api.dom("input[name='F_JustCaGround']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_JustCaGround === '') {
            JsParms.F_JustCaGround = 0;
        }
        //正舱舱壁
        JsParms.F_JustCaBulkhead = $api.val($api.dom("input[name='F_JustCaBulkhead']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_JustCaBulkhead === '') {
            JsParms.F_JustCaBulkhead = 0;
        }
        //正舱台面
        JsParms.F_JustCaMesa = $api.val($api.dom("input[name='F_JustCaMesa']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_JustCaMesa === '') {
            JsParms.F_JustCaMesa = 0;
        }
        //副舱通风
        JsParms.F_ViceCaAeration = $api.val($api.dom("input[name='F_ViceCaAeration']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ViceCaAeration === '') {
            JsParms.F_ViceCaAeration = 0;
        }
        //副舱地面
        JsParms.F_ViceCaGround = $api.val($api.dom("input[name='F_ViceCaGround']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ViceCaGround === '') {
            JsParms.F_ViceCaGround = 0;
        }
        //副舱舱壁
        JsParms.F_ViceCaBulkhead = $api.val($api.dom("input[name='F_ViceCaBulkhead']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ViceCaBulkhead === '') {
            JsParms.F_ViceCaBulkhead = 0;
        }
        //副舱台面
        JsParms.F_ViceCaMesa = $api.val($api.dom("input[name='F_ViceCaMesa']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ViceCaMesa === '') {
            JsParms.F_ViceCaMesa = 0;
        }
        //过度舱通风
        JsParms.F_ExceCaAeration = $api.val($api.dom("input[name='F_ExceCaAeration']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ExceCaAeration === '') {
            JsParms.F_ExceCaAeration = 0;
        }
        //过度舱地面
        JsParms.F_ExceCaGround = $api.val($api.dom("input[name='F_ExceCaGround']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ExceCaGround === '') {
            JsParms.F_ExceCaGround = 0;
        }
        //过度舱舱壁
        JsParms.F_ExceCaBulkhead = $api.val($api.dom("input[name='F_ExceCaBulkhead']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ExceCaBulkhead === '') {
            JsParms.F_ExceCaBulkhead = 0;
        }
        //过度舱台面
        JsParms.F_ExceCaMesa = $api.val($api.dom("input[name='F_ExceCaMesa']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_ExceCaMesa === '') {
            JsParms.F_ExceCaMesa = 0;
        }
        return JSON.stringify(JsParms);
    }





    
</script>
